import typescript from "rollup-plugin-ts";

const pkg = require("./package.json");
const input = "./src/index.ts";

export default [
  {
    input,
    output: {
      format: "umd",
      name: "RoughMarkup",
      file: pkg.main,
    },
    plugins: [
      typescript({
        tsconfig: (resolvedConfig) => ({
          ...resolvedConfig,
          target: "es5",
          declaration: false,
        }),
      }),
    ],
  },
  {
    input,
    output: {
      format: "esm",
      file: pkg.module,
    },
    plugins: [typescript()],
  },
];
